package com.lcb.acm;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        //String str = "hello nowcoder ";
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String[] s = str.split(" ");
        System.out.println(s[s.length-1].length());
    }
}
